using namespace std;
#include "comm.hpp"

int main()
{
    int fd = open(FIFO_FILE,O_WRONLY);
    if(fd < 0)
    {
        perror("clinet open file fail...");
        exit(FIFO_OPEN_ERR);
    }
    cout << "client open success" <<endl;
    string line;
    while(1)
    {
        cout << "Please Enter@ ";
        getline(cin,line);
        write(fd, line.c_str(), line.size());
    }

    close(fd);
    cout << "客户端关闭啦！..." << endl;
    return 0;
}